Conversation
Every xcodebuild job compiles the same sources, so each warning was annotated once per matrix leg, and more than once within a leg where several targets compile the same file. A single deprecation showed up ten-plus times on the same line of a pull request diff. Annotations belong to the check run that emits them, so they cannot be merged after the fact: the matrix jobs now only collect their warnings and a new `warnings` job annotates the deduplicated union once. - scripts/collect-warnings.sh parses a raw build log into deduplicated path/line/column/message records relative to the repository root, dropping diagnostics for files GitHub cannot annotate anyway (dependency checkouts, .build, .derivedData). - scripts/annotate-warnings.sh merges every job's file, annotates each unique warning once and writes the full list to the job summary, since GitHub only displays the first handful of annotations per step. - scripts/xcodebuild.sh, when WARNINGS_FILE is set, tees the raw log, filters xcbeautify's warning and notice annotations out of the live stream and appends the collected warnings to that file. Exit status is preserved and warnings are collected even when the build fails. Error annotations are left alone: those belong to the job that failed. With WARNINGS_FILE unset, behavior is unchanged for local runs. The `warnings` job is deliberately not part of `ci-success`: it reports, it does not gate. As a side effect the duplicated "Test run with N tests passed" notice annotations are gone too.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe build wrapper now captures raw output when Mergeability Score: ⚪ Minimal · up to This change centralizes duplicate compiler-warning annotations while preserving build exit status and local behavior; no actionable merge-blocking risk remains beyond normal checks and review. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage Report for CI Build 31716393287Coverage decreased (-1.5%) to 83.823%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions163 previously-covered lines in 8 files lost coverage.
Coverage Stats
💛 - Coveralls |
|
The following capabilities are marked
These may have been renamed, removed, or never registered. Please update the capability matrix. |
The scripts already document the flow in their own headers, and xcodebuild.sh documents WARNINGS_FILE, so the section only restated CI plumbing that agents do not act on. Reverts the dictionary entry it needed too.
What
Every
xcodebuildjob compiles the same sources, so each compiler warning was annotated once per matrix leg, and more than once within a leg where several targets compile the same file. On #1088 a single deprecation landed on the same line ten-plus times.Annotations belong to the check run that emits them, so they can't be merged after the fact. The matrix jobs now only collect their warnings; a new
warningsjob annotates the deduplicated union once.How
scripts/collect-warnings.sh(new) parses a rawxcodebuild/swift buildlog into deduplicatedpath⇥line⇥column⇥messagerecords relative to the repository root. Diagnostics for files GitHub can't annotate anyway (dependency checkouts,.build,.derivedData) are dropped, they currently land on.githubas a fallback.scripts/annotate-warnings.sh(new) merges every job's file, emits one annotation per unique warning, and writes the full table to the job summary, since GitHub only displays the first handful of annotations per step.scripts/xcodebuild.sh, whenWARNINGS_FILEis set, tees the raw log, filters xcbeautify's::warning/::noticelines out of the live stream, and appends collected warnings to that file. Exit status is preserved and warnings are still collected when the build fails.::errorannotations are left alone, those belong to the job that failed. WithWARNINGS_FILEunset, local runs behave exactly as before.ci.yml:macos,macos-legacyandexamplessetWARNINGS_FILEand upload awarnings-*artifact (1 day retention); the newwarningsjob downloads them all and annotates once. It is deliberately not part ofci-success, it reports rather than gates.Side effect: the duplicated
Test run with N tests passednotice annotations (8 per test leg) are gone as well.Verification
shellcheckclean on all three scripts;actionlintreports only pre-existing findings (Blacksmith runner labels,format-check's SC2086); cSpell passes.%escaping in messages, dependency-path filtering, indented diagnostics.xcodebuild.shdriven with stubxcodebuild/xcbeautifybinaries for four cases: collecting, failing build (exit 65 preserved, warnings still collected),WARNINGS_FILEunset, and noxcbeautifyonPATH.Known limitation
Derived data is cached, so an unchanged file may not be recompiled and its warning may not appear in a given run. That's pre-existing (it's why the legs report differing counts today), but it becomes more visible with a single annotator.